package com.softserveinc.ita.kaiji.dto;

import com.softserveinc.ita.kaiji.model.player.bot.Bot;
import org.apache.log4j.Logger;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * Represents Data Transfer Object which is used
 * to pass information about the game via a form
 * @author Vladyslav Shelest
 * @version 1.0
 * @since 19.03.14.
 */
@Component
public class GameInfoDto {

    private Logger logger = Logger.getLogger(GameInfoDto.class);

    @Size(min = 1, max = 10, message = "{Size.gameinfodtoimpl.gamename}")
    private String gameName;
    @Size(min = 1, max = 10, message = "{Size.gameinfodtoimpl.playername}")
    private String playerName;

    private Boolean isBotGame;
    @NotNull(message = "{NotNull.gameinfodtoimpl.numberofcards}")
    @Range(min = 1, max = 5, message = "{Range.gameinfodtoimpl.numberofcards}")
    private Integer numberOfCards;
    private Bot.Types botType;



    public String getGameName() {

        if (logger.isTraceEnabled())
            logger.trace("getGameName");

        return gameName;
    }


    public String getPlayerName() {
        if (logger.isTraceEnabled())
            logger.trace("getPlayerName");
        return playerName;
    }


    public boolean isBotGame() {
        if (logger.isTraceEnabled())
            logger.trace("isBotGame");
        return isBotGame;
    }


    public Integer getNumberOfCards() {
        if (logger.isTraceEnabled())
            logger.trace("getNumberOfCards");
        return numberOfCards;
    }

    public Boolean getIsBotGame() {
        return isBotGame;
    }

    public void setIsBotGame(Boolean isBotGame) {
        this.isBotGame = isBotGame;
    }

    public Bot.Types getBotType() {
        if (logger.isTraceEnabled())
            logger.trace("getBotType");
        return botType;
    }

    public void setGameName(String gameName) {
        if (logger.isTraceEnabled())
            logger.trace("setGameName");

        this.gameName = gameName;
    }

    public void setPlayerName(String playerName) {
        if (logger.isTraceEnabled())
            logger.trace("setPlayerName");
        this.playerName = playerName;
    }

    public void setIsBotGame(boolean isBotGame) {
        if (logger.isTraceEnabled())
            logger.trace("setIsBotGame");
        this.isBotGame = isBotGame;
    }

    public void setNumberOfCards(Integer numberOfCards) {
        if (logger.isTraceEnabled())
            logger.trace("setNumberOfCards");
        this.numberOfCards = numberOfCards;
    }

    public void setBotType(Bot.Types botType) {
        if (logger.isTraceEnabled())
            logger.trace("setBotType");
        this.botType = botType;
    }
}
